home *** CD-ROM | disk | FTP | other *** search
/ The Utilities Experience / The Utilities Experience - Volume 1.iso / software / business / onform / onf_install next >
Text File  |  1996-01-02  |  9KB  |  411 lines

  1.  
  2. ;** OnForm-Install (2-1-96)
  3. ;**
  4. ;** Install script for OnForm V2.0 - Shareware/Demo Version!
  5. ;**
  6. ;** Copyright © 1996 Paul Lathwell 
  7. ;** All rights reserved ;**
  8.  
  9.  
  10.  
  11.  
  12. ;**
  13. ;**  Ask user where to place `OnForm' and setup dir/file vars accordingly
  14. ;**
  15.  
  16. (complete 0)
  17.  
  18. (set onfdest
  19.     (askdir
  20.         (prompt "Select where to install `OnForm'\n"
  21.         "A directory will be created automatically.")
  22.         (help @askdir-help)
  23.         (default @default-dest)
  24.     )
  25. )
  26. (set onfdir             (tackon onfdest "OnForm"))
  27. (set @default-dest        onfdir)
  28. (set docdir               (tackon onfdir "Docs"))
  29. (set moddir               (tackon onfdir "Modules"))
  30. (set ocedir               (tackon moddir "OCE_Files"))
  31.  
  32.  
  33. ;**
  34. ;**  Create directory/Check if there is already a copy installed
  35. ;**
  36.  
  37. (set extype (exists onfdir))
  38. (if (= extype 1) (abort "A file named \"OnForm\" already exists"))
  39. (if (= extype 2)
  40.     (
  41.         (if (exists (tackon onfdir "OnForm"))
  42.             (
  43.                 (message
  44.                     (cat "A copy of `OnForm' already exists. "
  45.                          "If you proceed, this copy will be updated. Certain files "
  46.                          "may be overwritten."
  47.                     )
  48.                 )
  49.             )
  50.         )
  51.     )
  52.     (makedir onfdir (infos))
  53. )
  54. (makedir docdir (infos))
  55. (makedir moddir)
  56. (makedir ocedir)
  57. (makedir (tackon onfdir "Addresses"))
  58.  
  59. (complete 5)
  60.  
  61.  
  62.  
  63. ;**
  64. ;** Ask user where to store address files
  65. ;**
  66.  
  67. (set adddir
  68.    (askdir
  69.       (prompt "Please select where address\nfiles should be stored.")
  70.       (help @askdir-help)
  71.       (default (tackon onfdir "Addresses"))
  72.    )
  73. )
  74.  
  75.  
  76. ;** Make the directory if it does not exist
  77.  
  78. (set exdir (exists adddir ))
  79. (if (= exdir 0)
  80.    (makedir adddir)
  81. )
  82.  
  83.  
  84.  
  85. (complete 10)
  86.  
  87.  
  88. ;**
  89. ;**  Install Amos.library
  90. ;**
  91.  
  92. (copyfiles
  93.    (help @copyfiles-help)
  94.    (source "OnFormV2.0:libs/Amos.library")
  95.    (dest "LIBS:")
  96.    (prompt "Install Amos.library?...")
  97.    (confirm)
  98. )
  99.  
  100. (complete 15)
  101.  
  102.  
  103. ;**
  104. ;**  Install 'ReadMe.1st' file.
  105. ;**
  106.  
  107. (copyfiles
  108.    (help @copyfiles-help)
  109.    (source "OnFormV2.0:ReadMe.1st")
  110.    (dest onfdir)
  111.    (prompt "Installing 'ReadMe.1st' file...")
  112.    (infos)
  113. )
  114.  
  115. (complete 20)
  116.  
  117.  
  118. ;**
  119. ;**  Install Main OnForm Program
  120. ;**
  121.  
  122. (copyfiles
  123.     (help @copyfiles-help)
  124.     (source "OnFormV2.0:OnForm/OnForm")
  125.     (dest onfdir)
  126.     (prompt "Install main OnForm program?...")
  127.     (confirm)
  128.     (infos)
  129. )
  130.  
  131. (complete 25)
  132.  
  133.  
  134. ;**
  135. ;**   Check for/install main program preferences
  136. ;**
  137.  
  138. (copyfiles
  139.    (help @copyfiles-help)
  140.    (source "OnFormV2.0:OnForm/")
  141.    (dest onfdir)
  142.    (prompt "Preference files for the main OnForm program already exist."
  143.            "Please select which ones should be installed...")
  144.    (pattern "#?.Prefs")
  145.    (confirm)
  146. )
  147.  
  148. (complete 30)
  149.  
  150.  
  151. ;**
  152. ;**  Install Modules
  153. ;**
  154.  
  155. (set askmod
  156.    (askbool
  157.       (help "\n    \"Install modules?\"\n\n"
  158.             "    Allows you to decide whether or not additional "
  159.             "program modules should be installed. If you selected "
  160.             "'Expert' when you began installation, you will be given "
  161.             "a further option allowing you to select which modules "
  162.             "should be installed.\n\n    'Yup' - Install modules.\n\n"
  163.             "    'Nope' - Continue without installing modules.")
  164.       (prompt "Install modules?...")
  165.       (default 1)
  166.       (choices "Yup" "Nope")
  167.    )
  168. )
  169. (if (= askmod 1)
  170.    (copyfiles
  171.       (help @copyfiles-help)
  172.       (source "OnFormV2.0:OnForm/Modules/")
  173.       (dest moddir)
  174.       (prompt "Please select modules to be installed...")
  175.       (choices "ADP" "OCE" "Prefs_Ed")
  176.       (confirm)
  177.    )
  178. )
  179.  
  180. (complete 40)
  181.  
  182.  
  183.  
  184. ;**
  185. ;**   Install preferences files for installed modules
  186. ;**
  187.  
  188. (set exdest (exists (tackon moddir "ADP")))
  189. (if (= exdest 1)
  190.    (copyfiles
  191.       (help @copyfiles-help)
  192.       (source "OnFormV2.0:OnForm/Modules/ADPMOD.Prefs")
  193.       (dest moddir)
  194.       (prompt "Install existing preference file\nfor the ADP module?...")
  195.       (confirm)
  196.    )
  197. )
  198.  
  199. (complete 45)
  200.  
  201.  
  202. ;**
  203. ;**   Install existing address files
  204. ;**
  205.  
  206. (set insadd
  207.    (askbool
  208.       (help "\n    \"Install existing address files?\"\n\n"
  209.             "    Allows you to decide whether or not existing "
  210.             "address files should be installed.\n\n"
  211.             "    'Yup' - Install existing address files.\n\n"
  212.             "    'Nope' - Continue without installing addresses.")
  213.       (prompt "Install existing address files?")
  214.       (default 1)
  215.       (choices "Yup" "Nope")
  216.    )
  217. )
  218. (if (= insadd 0)
  219.    (set exadd (exists (tackon adddir "Addresses")))
  220.    (if (= exadd 0)
  221.       (copyfiles
  222.          (help @copyfiles-help)
  223.          (source "OnFormV2.0:OnForm/Addresses/")
  224.          (dest adddir)
  225.          (prompt "Installing existing address files...")
  226.          (all)
  227.          (files)
  228.       )
  229.    )
  230.    (if (= exadd 2)
  231.       (foreach "OnFormV2.0:OnForm/Addresses/" "#?.ADP"
  232.          (set exdest (exists (tackon adddir @each-name)))
  233.          (if (= exdest 0)
  234.             (copyfiles
  235.                (help @copyfiles-help)
  236.                (source (tackon "OnFormV2.0:OnForm/Addresses/" @each-name))
  237.                (dest adddir)
  238.                (prompt "Installing '.ADP' files...")
  239.             )
  240.          )
  241.       (complete 50)
  242.       )
  243.    )
  244.    (if (= exadd 2)
  245.       (foreach "OnFormV2.0:OnForm/Addresses/" "#?.AP"
  246.          (set exdest (exists (tackon adddir @each-name)))
  247.          (if (= exdest 0)
  248.             (copyfiles
  249.                (help @copyfiles-help)
  250.                (source (tackon "OnFormV2.0:OnForm/Addresses/" @each-name))
  251.                (dest adddir)
  252.                (prompt "Installing '.AP' files...")
  253.             )
  254.          )
  255.       (complete 55)
  256.       )
  257.    )
  258.    (if (= exadd 2)
  259.       (foreach "OnFormV2.0:OnForm/Addresses/" "#?.OnF"
  260.          (set exdest (exists (tackon adddir @each-name)))
  261.          (if (= exdest 0)
  262.             (copyfiles
  263.                (help @copyfiles-help)
  264.                (source (tackon "OnFormV2.0:OnForm/Addresses/" @each-name))
  265.                (dest adddir)
  266.                (prompt "Installing '.OnF' files...")
  267.             )
  268.          )
  269.       )
  270.    )
  271. )
  272.  
  273. (complete 60)
  274.  
  275.  
  276. ;**
  277. ;**   Install existing OCE files
  278. ;**
  279.  
  280. (set exmod (exists (tackon moddir "OCE")))
  281. (if (= exmod 1)
  282.    (set insoce
  283.       (askbool
  284.          (help "\n    \"Install existing OCE files?\"\n\n"
  285.                "    Allows you to decide whether ot not existing "
  286.                "OCE files should be installed.\n\n"
  287.                "    'Yup' - Install existing OCE files.\n\n"
  288.                "    'Nope' - Continue without installing OCE files.")
  289.          (prompt "Install existing '.OCE' files?")
  290.          (default 1)
  291.          (choices "Yup" "Nope")
  292.       )
  293.    )
  294. )
  295. (if (= insoce 0)
  296.    (set exoce (exists (tackon moddir "OCE_Files")))
  297.    (if (= exoce 0)
  298.       (copyfiles
  299.          (help @copyfiles-help)
  300.          (source "OnFormV2.0:OnForm/Modules/OCE_Files/")
  301.          (dest ocedir)
  302.          (prompt "Installing OCE files...")
  303.          (pattern "#?.OCE")
  304.          (files)
  305.       )
  306.    )
  307. )
  308.  
  309. (complete 70)
  310.  
  311.  
  312. ;**
  313. ;**   Install existing Auto-Load & Def-OCE files
  314. ;**
  315.  
  316. (copyfiles
  317.    (help @copyfiles-help)
  318.    (source "OnFormV2.0:OnForm/")
  319.    (dest onfdir)
  320.    (Prompt "Install 'Auto-Load' file?")
  321.    (pattern "Auto-ADP")
  322.    (confirm)
  323. )
  324.  
  325. (complete 75)
  326.  
  327. (copyfiles
  328.    (help @copyfiles-help)
  329.    (source "OnFormV2.0:OnForm/Modules/")
  330.    (dest moddir)
  331.    (prompt "Install 'Def-OCE' file?")
  332.    (pattern "Def-OCE")
  333.    (confirm)
  334. )
  335.  
  336.  
  337. (complete 80)
  338.  
  339. ;**
  340. ;**  Install documentation
  341. ;**
  342.  
  343. (set exprog (exists (tackon onfdir "OnForm")))
  344. (if (= exprog 1)
  345.    (copyfiles
  346.       (help @copyfiles-help)
  347.       (source "OnFormV2.0:OnForm/Docs/")
  348.       (dest docdir)
  349.       (prompt "Please select which documents\nshould be installed...")
  350.       (choices "OnForm.Doc" "OnForm-Tutorial" "OnForm-Set-Up")
  351.       (confirm)
  352.       (infos)
  353.    )
  354. )
  355.  
  356. (complete 85)
  357.  
  358. (set exmod (exists (tackon moddir "ADP")))
  359. (if (= exmod 1)
  360.    (copyfiles
  361.       (help @copyfiles-help)
  362.       (source "OnFormV2.0:OnForm/Docs/")
  363.       (dest docdir)
  364.       (prompt "Install documentation for 'ADP' module?")
  365.       (choices "ADP.Doc")
  366.       (confirm)
  367.       (infos)
  368.    )
  369. )
  370.  
  371. (complete 90)
  372.  
  373. (set exmod (exists (tackon moddir "OCE")))
  374. (if (= exmod 1)
  375.    (copyfiles
  376.       (help @copyfiles-help)
  377.       (source "OnFormV2.0:OnForm/Docs/")
  378.       (dest docdir)
  379.       (prompt "Install documentation for 'OCE' module?")
  380.       (choices "OCE.Doc")
  381.       (confirm)
  382.       (infos)
  383.    )
  384. )
  385.  
  386. (complete 95)
  387.  
  388. ;**
  389. ;** Make program assign in the 'user-startup' file
  390. ;**
  391.  
  392. (startup "OnForm"
  393.    (help @startup-help)
  394.    (prompt "It is recommended to modify the 's:User-Startup'\n"
  395.    "file to make the necessary program assigns.\n"
  396.    "Shall I do this for you now?")
  397.    (command
  398.       "Assign OnForm: \"" onfdir "\"\n"
  399.       "Assign Addresses: \"" adddir "\"\n"
  400.    )
  401. )
  402.  
  403. (makeassign "OnForm" onfdir)
  404. (makeassign "Addresses" adddir)
  405.  
  406.  
  407. (complete 100)
  408.  
  409.  
  410. (exit)
  411.